package com.hxh.util;

import cn.hutool.core.date.DateUtil;

import java.util.Date;

public class DateUtils {
    public static String getDateStrYMDHMSAsFileName() {
        return DateUtil.format(new Date(), "yyyyMMddHHmmss") + "_";
    }

    public static String getDateStrYMDHMS() {
        return getDateStrYMDHMS(new Date());
    }

    public static String getDateStrYMDHMS(Date date) {
        return DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
    }

    public static String getDateStrYMD(Date date) {
        return DateUtil.format(date, "yyyy-MM-dd");
    }
}
